<script setup lang="ts"></script>

<template>
  <!-- homePage首页 start -->
  <div class="home">
    <div class="home-bg">
      <!-- <video class="home-bg-video" src="https://fastcdn.mihoyo.com/content-v2/plat/100679/ba72c811245560287faddd66c0e7fbcc_4722467585311483596.mp4" poster="../static/video-bg-poster.png" 
        autoplay loop muted></video> -->
      <div class="bg-mask"></div>
    </div>
    <div class="home-logo">
      <img src="../static/logo.png" alt="home-logo">
    </div>
    <!-- homePage中间区域 start -->
    <div class="home-content">
      <div class="slogan">
        <img src="../static/slogan.png" alt="home-slg">
      </div>
      <div class="home-content-btn">
        <div class="home-content-btn-start"></div>
        <b></b>
      </div>
      <div class="scroll-btn"></div>
    </div>
    <!-- 中间区域end -->
  </div>
  <!-- end homePage -->
</template>

<style scoped lang="scss">
.home{
  width: 100%;
  height: 100%;

  .home-bg{
    .home-bg-video{
      width: 100%;
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate3d(-50%, -50%, 0);
      z-index: -1;
      background-repeat: no-repeat;
    }

    .bg-mask{
      position: absolute;
      width: 100%;
      height: 100%;
      top: 0;
      left: 0;
      background-color: rgba(0, 0, 0, 0.7);
    }
  }
  .home-logo{
    position: absolute;
    top: 15px;
    left: 40px;

    img{
      width: 90px;
    }
  }
  .home-content{
    width: 575px;
    margin: auto;
    position: relative;

    .slogan{
      width: 500px;
      margin-left: 75px;
      margin-bottom: 40px;
      animation: slideUp 0.8s ease-out;
      opacity: 0;
      animation-fill-mode: forwards;

      img{
        width: 500px;
      }
    }

    .home-content-btn{
      position: relative;
      bottom: 0;
      left: 0;
      width: fit-content;
      margin: 0 auto;
      display: flex;
      justify-content: center;
      animation: slideUp 0.8s ease-out;
      opacity: 0;
      animation-fill-mode: forwards;

      .home-content-btn-start{
        width: 90px;
        height: 50px;
        background-size: contain;
        background-repeat: no-repeat;
        background-position: center;
        background-image: url(../static/btn-start.png);
        cursor: pointer;
        transition: all 0.3s ease;
      }

      b{
        width: 0;
        height: 0;
        position: absolute;
        border: 8px solid transparent;
        border-left-color: rgb(255, 255, 255);
        border-left: 15px solid #fff;
        margin-left: 10px;
        margin-top: 17px;
        cursor: pointer;
        transition: all 0.3s ease;
        pointer-events: none;
      }

      &:hover {
        .home-content-btn-start {
          background-image: url(../static/btn-start-hover.png);
        }
        b {
          border-left-color: rgb(78,161,217);
          border-left: 15px solid rgb(78,161,217);
        }
      }
    }
  }
}

// 滑动出现效果
@keyframes slideUp {
  from {
    transform: translateY(-30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
</style>
